<?php
/**
 * Created by PhpStorm.
 * User: xutao
 * Date: 2018/8/3
 * Time: 11:02
 */
namespace app\admin\model;
use think\Model;

class DestinationModel extends Model{
    protected $table = 'think_destination';
    protected $autoWriteTimestamp = 'datetime';
    //获取器
    public function getTypeAttr($value)
    {
        $status = [1=>'景点',2=>'基础建筑'];
        return $status[$value];
    }
    //获取key
    public function getKeyAttr($value){
        return explode(',',$value);
    }

}